import React from 'react';
import classNames from 'classnames';

import './style.scss';

export interface IconProps
    extends React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {
    themeDark?: boolean;
    type?: boolean;
    className?: string;
    alt?: string;
}

export default function Icon({ themeDark, type, className, alt, ...otherProps }: IconProps) {
    const getBase64ImgSrc = (type: boolean | undefined, themeDark: boolean | undefined): string => {
        let src = '';
        if (themeDark) {
            // 全屏状态
            if (type) {
                src =
                    '';
            } else {
                src =
                    '';
            }
        } else {
            // 全屏状态
            if (type) {
                src =
                    '';
            } else {
                src =
                    '';
            }
        }
        return src;
    };
    return (
        <img
            {...otherProps}
            className={classNames('dtc-fullscreen-icon', className)}
            alt={alt}
            src={getBase64ImgSrc(type, themeDark)}
        />
    );
}
